﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Data.SQLite;

namespace ALS.UnitTest
{
    [TestClass]
    public class SqliteTest
    {
        [TestMethod]
        public void SetDbPassword()
        {
            var password = "!Q@W3e4r";
            SQLiteConnection conn = new SQLiteConnection();
            conn.ConnectionString = @"Data Source=.\ALS.s3db";
            try
            {
                conn.Open();
            }
            catch (Exception ex)
            {
                throw new Exception("无法连接到数据库!" + ex.Message);
            }
            conn.ChangePassword(password);
            conn.Close();
        }

        [TestMethod]
        public void ClearTable()
        {

        }
    }
}
